﻿<Page x:Class="GerenteEBD.lista_pessoas"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="400" d:DesignWidth="700"
	Title="lista_pessoas">

        <Grid>
        <Grid.DataContext>
            <XmlDataProvider x:Name="FonteDadosPessoas"  Source="ebd.xml" XPath="ebd/pessoas/pessoa" />
        </Grid.DataContext>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
            
        <ListBox x:Name="TeamsListBox" DockPanel.Dock="Left"
                     ItemsSource="{Binding}"
                     ItemTemplate="{StaticResource TepmlateItemPessoa}"
                     Visibility="Visible" SelectionMode="Single"
                     HorizontalContentAlignment="Stretch"
                     Grid.Column="0"
                    />
        <StackPanel Orientation="Vertical"  Grid.Column="1" Height="400" >
            <StackPanel VerticalAlignment="Top" Height="350" >
                <StackPanel Orientation="Horizontal">
                    <Label Content="Detalhes" Foreground="#FF549940" FontSize="16" />
                 </StackPanel>
                <StackPanel Orientation="Horizontal">
                <Label Content="Codigo:" Width="{DynamicResource LarguraLabelFormulario}"/>
                <TextBox x:Name="txtCodigo" Text="{Binding XPath=Codigo}" HorizontalAlignment="Left" VerticalAlignment="Center" Width="{DynamicResource LarguraTextBox}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Label  Content="Nome:" Width="{DynamicResource LarguraLabelFormulario}"/>
                <TextBox x:Name="txtNome"  Text="{Binding XPath=Nome}" Width="{DynamicResource LarguraTextBox}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Label Content="E-mail:" Width="{DynamicResource LarguraLabelFormulario}" />
                <TextBox x:Name="txtEmail" Text="{Binding XPath=Email}" Width="{DynamicResource LarguraTextBox}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Label Content="Data Nasc.:" Width="{DynamicResource LarguraLabelFormulario}" />
                <TextBox x:Name="txtDataNascimento" Text="{Binding XPath=DataNascimento}" Width="73" />
            </StackPanel>
            <StackPanel Orientation="Horizontal"/>

            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" HorizontalAlignment="Center" Height="40" Width="400" VerticalAlignment="Center">
                <StackPanel.Background>
                    <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                        <GradientStop Color="#FF838CAC"/>
                        <GradientStop Color="#FF9EC1F1" Offset="1"/>
                    </LinearGradientBrush>
                </StackPanel.Background>
                <Button x:Name="NewTeamButton" Click="NewTeamButton_Click" Width="50" Margin="5" Content="Novo" RenderTransformOrigin="1.3,0.508" Background="{DynamicResource BotaoCinza}"/>
                <Button x:Name="SaveTeamsButton" Click="SaveTeamsButton_Click" Width="50" Margin="5" Content="Salvar" Background="{DynamicResource BotaoCinza}"/>
                <Button x:Name="DeleteTeamsButton" Click="DeleteTeamsButton_Click" Width="50" Margin="5" Content="Apagar" Background="{DynamicResource BotaoCinza}"/>
            </StackPanel>

        </StackPanel>
    </Grid>
</Page>
